#ifndef CLAPPER_H
#define CLAPPER_H

#define xdim 640  // for the screen
#define ydim 480
#define FRAMERATEDEFAULT 10

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>

#include "savevideo.h"

extern int exitsequence;

void savetobuffer(struct savevideodata *sd, int bi, void * p);
void updateTexture(const unsigned char *p);
void savetobufferImageAndTexture(struct savevideodata *sd, int bi, XImage *image);
void endProgram();
double saveframe(int last);
double getcapturetime();
void drawtotexture(unsigned char * yd, unsigned char *ud, unsigned char *vd);
void drawboxtotexture(int xp, int yp, int size, unsigned long  rgb);
#endif
